package cn.humaohua.study.yanmo_design_pattern.ch13.v4;

public class CookManager {
    private static boolean runFlag = false;

    public static void runCookManager() {
        if (!runFlag) {
            runFlag = true;
            HotCook hotCook1 = new HotCook("张三");
            HotCook hotCook2 = new HotCook("李四");
            HotCook hotCook3 = new HotCook("王五");

            Thread t1 = new Thread(hotCook1);
            Thread t2 = new Thread(hotCook2);
            Thread t3 = new Thread(hotCook3);
            t1.start();
            t2.start();
            t3.start();

        }
    }
}
